<section class="pt-2">
  {{ if and (gt .WordCount 400 ) (.Params.toc) }}
  <a class="btn btn-lg dropdown-toggle" style="color:{{ .Site.Params.mainColour }}" data-bs-toggle="collapse"
    href="#collapseTOC" role="button" aria-expanded="false" aria-controls="collapseTOC">
    {{ i18n "pageTOC" }}
  </a>
  <div class="collapse" id="collapseTOC">
    <div class="card-body toc-list-group">
      <div class="card-body">
        {{.TableOfContents}}
      </div>
    </div>
  </div>
  {{ end }}
</section>